import {createRouter, createWebHashHistory} from 'vue-router'

const router = createRouter({
    history: createWebHashHistory(),
    routes: [
        {
            path: '/',
            redirect: '/home',
        },
        {
            name: 'home',
            path: '/home',
            component: () => import('@/views/home/index.vue'),
            meta: { showFooter: true },
        },
        {
            name: 'search',
            path: '/search',
            component: () => import('@/views/search/index.vue'),
            meta: { showFooter: true },
        },
        {
            name: 'login',
            path: '/login',
            component: () => import('@/views/login/index.vue'),
            meta: { showFooter: false },
        },
        {
            name: 'register',
            path: '/register',
            component: () => import('@/views/register/index.vue'),
            meta: { showFooter: false },
        },
        {
            name: 'detail',
            path: '/detail/:id',
            component: () => import('@/views/detail/index.vue'),
            meta: { showFooter: false },
        },
    ],
})

export default router